#include "NNNetWork.h"

NNNetWork::NNNetWork()
{
    Init();
}

NNNetWork::~NNNetWork()
{
    UnInit();
}

void NNNetWork::AddLayer(NNLayer * pLayer)
{
    assert(pLayer != NULL);
    m_Layers.push_back(pLayer);
}

void NNNetWork::Init()
{
    Reuse();
}

void NNNetWork::UnInit()
{
    Reuse();
}

void NNNetWork::Reuse()
{
    VectorLayers::iterator lit;

    for(lit = m_Layers.begin(); lit < m_Layers.end(); lit ++)
    {
        if(*lit)
          delete *lit;
    }
    m_Layers.clear();
}
